home *** CD-ROM | disk | FTP | other *** search
/ PD ROM 1 / PD ROM Volume I - Macintosh Software from BMUG (1988).iso / Stacks / Hyper Business / Memo Stuff / MemoNoteStack / card_2885.txt < prev    next >
Encoding:
Text File  |  1988-04-19  |  14.0 KB  |  410 lines

  1. -- card: 2885 from stack: in
  2. -- bmap block id: 2124
  3. -- flags: 0000
  4. -- background id: 2781
  5. -- name: 
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: 8003
  11. -- rect: left=37 top=68 right=94 bottom=121
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: MemoNote
  20. ----- HyperTalk script -----
  21. on mouseUp
  22.   send memoNote
  23. end mouseUp
  24.  
  25.  
  26.  
  27.  
  28. -- part 2 (button)
  29. -- low flags: 00
  30. -- high flags: 8003
  31. -- rect: left=126 top=68 right=94 bottom=213
  32. -- title width / last selected line: 0
  33. -- icon id / first selected line: 0 / 0
  34. -- text alignment: 1
  35. -- font id: 0
  36. -- text size: 12
  37. -- style flags: 0
  38. -- line height: 16
  39. -- part name: ShowNotes
  40. ----- HyperTalk script -----
  41. on mouseUp
  42.   send ShowNotes
  43. end mouseUp
  44.  
  45.  
  46.  
  47.  
  48. -- part 9 (button)
  49. -- low flags: 00
  50. -- high flags: 8003
  51. -- rect: left=218 top=68 right=94 bottom=319
  52. -- title width / last selected line: 0
  53. -- icon id / first selected line: 0 / 0
  54. -- text alignment: 1
  55. -- font id: 0
  56. -- text size: 12
  57. -- style flags: 0
  58. -- line height: 16
  59. -- part name: RemoveNotes
  60. ----- HyperTalk script -----
  61. on mouseUp
  62.   send KillNotes
  63. end mouseUp
  64.  
  65.  
  66.  
  67.  
  68. -- part 39 (field)
  69. -- low flags: 80
  70. -- high flags: 4007
  71. -- rect: left=35 top=111 right=287 bottom=487
  72. -- title width / last selected line: 0
  73. -- icon id / first selected line: 0 / 0
  74. -- text alignment: 0
  75. -- font id: 4
  76. -- text size: 9
  77. -- style flags: 0
  78. -- line height: 12
  79. -- part name: Note 2
  80.  
  81.  
  82. -- part 107 (button)
  83. -- low flags: 00
  84. -- high flags: 8003
  85. -- rect: left=324 top=68 right=95 bottom=426
  86. -- title width / last selected line: 0
  87. -- icon id / first selected line: 0 / 0
  88. -- text alignment: 1
  89. -- font id: 0
  90. -- text size: 12
  91. -- style flags: 0
  92. -- line height: 16
  93. -- part name: Show Scripts
  94. ----- HyperTalk script -----
  95. on mouseUp
  96.   edit script of this stack
  97. end mouseUp
  98.  
  99.  
  100.  
  101.  
  102. -- part 135 (button)
  103. -- low flags: 00
  104. -- high flags: C002
  105. -- rect: left=42 top=108 right=126 bottom=113
  106. -- title width / last selected line: 0
  107. -- icon id / first selected line: 0 / 0
  108. -- text alignment: 1
  109. -- font id: 0
  110. -- text size: 12
  111. -- style flags: 0
  112. -- line height: 16
  113. -- part name: First Note
  114. ----- HyperTalk script -----
  115. *NoteButtonScript*
  116. on mouseup
  117.   global gMoveNote
  118.   put the visible of card field id 136 into showing
  119.   showfield showing
  120. end mouseUp
  121. **
  122. on killField
  123.   set the visible of card field id 136 to true
  124.   choose field Tool
  125.   click at the loc of card field id 136
  126.   domenu clear field
  127. end killField
  128. ***
  129. on showField showing
  130.   global gMoveNote
  131.   if the paramcount=0 then put false into showing
  132.   if (showing=false and gMoveNote = false) or (showing=true and gMoveNote = true) then
  133.     -- if the field isn't showing and the button hasn't been moved
  134.     -- then show the field in its present location
  135.     -- or if the field is showing but the button has been moved
  136.     -- then reshow the field in its new location
  137.     doHilite true
  138.     get the rect of me
  139.     put it into bRect
  140.     get the rect of  card field id 136
  141.     put (item 3 of it - item 1 of it) /2 into fH
  142.     put (item 4 of it - item 2 of it) /2 into fV
  143.     show card field id 136 at trunc(fH)+item 1 of bRect, trunc(fV)+item 4 of bRect-1
  144.   else
  145.     doHilite false
  146.     hide card field id 136
  147.   end if
  148. end showField
  149. ****
  150. MemoNotes‚Ñ¢ Hypernote system
  151. ¬©1988 PeterFraterdeus
  152. CIS 73306,2703
  153. ShareWare-$15. to: Alphabets, Inc.
  154. 804 Dempster St./ Evanston, IL. 60202
  155.  
  156.  
  157.  
  158. -- part 136 (field)
  159. -- low flags: 00
  160. -- high flags: 4007
  161. -- rect: left=42 top=125 right=281 bottom=482
  162. -- title width / last selected line: 0
  163. -- icon id / first selected line: 0 / 0
  164. -- text alignment: 0
  165. -- font id: 3
  166. -- text size: 9
  167. -- style flags: 0
  168. -- line height: 12
  169. -- part name: Note 136
  170.  
  171.  
  172. -- part 144 (button)
  173. -- low flags: 00
  174. -- high flags: 8002
  175. -- rect: left=323 top=100 right=118 bottom=427
  176. -- title width / last selected line: 0
  177. -- icon id / first selected line: 0 / 0
  178. -- text alignment: 1
  179. -- font id: 0
  180. -- text size: 12
  181. -- style flags: 0
  182. -- line height: 16
  183. -- part name: TransferScripts
  184. ----- HyperTalk script -----
  185. --This is a development tool for creating script writing scripts.
  186. --The concept is to create a working model of the object (a note button
  187. --in this case) and create a chunk of imbedded script that can be copied
  188. --to the object creating script.
  189. --Operating on this script, the result (created in the script of
  190. --"tempbutton") would start like this:
  191. --    put"on mouseup"&return after NoteButtonScript
  192. --    put"  global tempscript"&return after NoteButtonScript
  193. --"NoteButtonScript" is a varible local to the object creating script.
  194. --"Fieldid" is any calculated and changing information, keyed to the
  195. --quoted text in TargText
  196. on mouseUp
  197.   put "" into tempscript
  198.   put "card field id" into targText
  199.   put "put"&Quote into Frag1
  200.   put quote&"&return after NoteButtonScript"&return into Frag2
  201.   put the script of button "First Note" into it
  202.   repeat with n = 1 to the number of lines in it
  203.     if line n of it contains targText then
  204.       put quote&"&&Fieldid&&""e into char offset (targText,line n of it)-1 to offset (targText,line n of it)+length(targText)+3 of line n of it
  205.     end if
  206.     put Frag1&line n of it &Frag2 after tempScript
  207.   end repeat
  208.   set the script of button tempbutton to tempscript
  209. end mouseUp
  210.  
  211. Used for the MemoNotes‚Ñ¢ System
  212. ¬©1988 Peter Fraterdeus
  213. CIS 73306,2703
  214.  
  215.  
  216.  
  217. -- part 146 (button)
  218. -- low flags: 00
  219. -- high flags: 8002
  220. -- rect: left=221 top=100 right=118 bottom=322
  221. -- title width / last selected line: 0
  222. -- icon id / first selected line: 0 / 0
  223. -- text alignment: 1
  224. -- font id: 0
  225. -- text size: 12
  226. -- style flags: 0
  227. -- line height: 16
  228. -- part name: TempButton
  229. ----- HyperTalk script -----
  230. put"*NoteButtonScript*"&return after NoteButtonScript
  231. put"on mouseup"&return after NoteButtonScript
  232. put"  global gMoveNote"&return after NoteButtonScript
  233. put"  put the visible of"&&Fieldid&&" into showing"&return after NoteButtonScript
  234. put"  showfield showing"&return after NoteButtonScript
  235. put"end mouseUp"&return after NoteButtonScript
  236. put"**"&return after NoteButtonScript
  237. put"on killField"&return after NoteButtonScript
  238. put"  set the visible of"&&Fieldid&&" to true"&return after NoteButtonScript
  239. put"  choose field Tool"&return after NoteButtonScript
  240. put"  click at the loc of"&&Fieldid&&""&return after NoteButtonScript
  241. put"  domenu clear field"&return after NoteButtonScript
  242. put"end killField"&return after NoteButtonScript
  243. put"***"&return after NoteButtonScript
  244. put"on showField showing"&return after NoteButtonScript
  245. put"  global gMoveNote"&return after NoteButtonScript
  246. put"  if the paramcount=0 then put false into showing"&return after NoteButtonScript
  247. put"  if (showing=false and gMoveNote = false)¬¨"&return after NoteButtonScript
  248. put"  or (showing=true and gMoveNote = true) then"&return after NoteButtonScript
  249. put"    -- if the field isn't showing and the button hasn't been moved"&return after NoteButtonScript
  250. put"    -- then show the field in its present location"&return after NoteButtonScript
  251. put"    -- or if the field is showing but the button has been moved"&return after NoteButtonScript
  252. put"    -- then reshow the field in its new location"&return after NoteButtonScript
  253. put"    doHilite true"&return after NoteButtonScript
  254. put"    get the rect of me"&return after NoteButtonScript
  255. put"    put it into bRect"&return after NoteButtonScript
  256. put"    get the rect of "&&Fieldid&&""&return after NoteButtonScript
  257. put"    put (item 3 of it - item 1 of it) /2 into fH"&return after NoteButtonScript
  258. put"    put (item 4 of it - item 2 of it) /2 into fV"&return after NoteButtonScript
  259. put"    show"&&Fieldid&&" at trunc(fH)+item 1 of bRect, ¬¨"&return after NoteButtonScript
  260. put"    trunc(fV)+item 4 of bRect-1"&return after NoteButtonScript
  261. put"  else"&return after NoteButtonScript
  262. put"    doHilite false"&return after NoteButtonScript
  263. put"    hide"&&Fieldid&&""&return after NoteButtonScript
  264. put"  end if"&return after NoteButtonScript
  265. put"end showField"&return after NoteButtonScript
  266. put"****"&return after NoteButtonScript
  267. put"MemoNotes‚Ñ¢ Hypernote system"&return after NoteButtonScript
  268. put"¬©1988 PeterFraterdeus"&return after NoteButtonScript
  269. put"CIS 73306,2703"&return after NoteButtonScript
  270. put"ShareWare-$15. to: Alphabets, Inc."&return after NoteButtonScript
  271. put"804 Dempster St./ Evanston, IL. 60202"&return after NoteButtonScript
  272.  
  273.  
  274.  
  275. -- part 157 (button)
  276. -- low flags: 00
  277. -- high flags: C002
  278. -- rect: left=219 top=173 right=191 bottom=356
  279. -- title width / last selected line: 0
  280. -- icon id / first selected line: 0 / 0
  281. -- text alignment: 1
  282. -- font id: 0
  283. -- text size: 12
  284. -- style flags: 0
  285. -- line height: 16
  286. -- part name: Note
  287. ----- HyperTalk script -----
  288. *NoteButtonScript*
  289. *NoteButton created Sat, Jan 23, 1988 8:01 PM
  290. on mouseup
  291.   global gMoveNote
  292.   put the visible of card field id 158  into showing
  293.   showfield showing
  294. end mouseUp
  295. **
  296. on killField
  297.   set the visible of card field id 158  to true
  298.   choose field Tool
  299.   click at the loc of card field id 158
  300.   domenu clear field
  301. end killField
  302. ***
  303. on showField showing
  304.   global gMoveNote
  305.   if the paramcount=0 then put false into showing
  306.   if (showing=false and gMoveNote = false) or (showing=true and gMoveNote = true) then
  307.     -- if the field isn't showing and the button hasn't been moved
  308.     -- then show the field in its present location
  309.     -- or if the field is showing but the button has been moved
  310.     -- then reshow the field in its new location
  311.     doHilite true
  312.     get the rect of me
  313.     put it into bRect
  314.     get the rect of  card field id 158
  315.     put (item 3 of it - item 1 of it) /2 into fH
  316.     put (item 4 of it - item 2 of it) /2 into fV
  317.     show card field id 158  at trunc(fH)+item 1 of bRect, trunc(fV)+item 4 of bRect-1
  318.   else
  319.     doHilite false
  320.     hide card field id 158
  321.   end if
  322. end showField
  323. ****
  324. MemoNotes‚Ñ¢ Hypernote system
  325. ¬©1988 PeterFraterdeus
  326. CIS 73306,2703
  327. ShareWare-$15. to: Alphabets, Inc.
  328. 804 Dempster St./ Evanston, IL. 60202
  329.  
  330.  
  331.  
  332. -- part 158 (field)
  333. -- low flags: 00
  334. -- high flags: 4007
  335. -- rect: left=219 top=190 right=275 bottom=377
  336. -- title width / last selected line: 0
  337. -- icon id / first selected line: 0 / 0
  338. -- text alignment: 0
  339. -- font id: 3
  340. -- text size: 9
  341. -- style flags: 0
  342. -- line height: 12
  343. -- part name: Note 158
  344.  
  345.  
  346. -- part contents for card part 39
  347. ----- text -----
  348. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  349. This MemoNote contains the script for the ShowNote procedure.
  350. Copy and Paste it into your Home Stack. Then Copy the ShowNote Button to any Stack. (Use Shift Opt-Click in Browse mode for self copying of the button... See below)
  351. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  352.  
  353. on ShowNotes -- 7 Jan '88 by Peter Fraterdeus
  354.   --‚Ä¢Sends a mouseUp message to any button named "Note" on a card
  355.   -- thus toggling the visiblity of the Note Field
  356.   --‚Ä¢Put this script in your Home Stack, and use Shift-Opt.Click
  357.   -- to copy the ShowNotes button, paste in Bkgnd. of your Stack.
  358.   set lockscreen to true
  359.   if the shiftKey is down and the optionKey is down then
  360.     choose button tool
  361.     click at the loc of me -- Shift-Opt.Click to copy ShowNotes button*
  362.     domenu copy button
  363.     put "Show Note Button copied..." into msg
  364.     choose browse tool
  365.     exit shownotes
  366.   end if
  367.   if the shiftKey is down then -- Shift-Click to edit script*
  368.     edit script of me
  369.     exit shownotes
  370.   end if
  371.   repeat with btn=1 to the number of card buttons
  372.     if short name of card button btn = "Note" then
  373.       send mouseup to card button btn
  374.     end if
  375.   end repeat
  376. end ShowNotes
  377.  
  378.  
  379. -- part contents for card part 136
  380. ----- text -----
  381. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  382. The script for this Stack contains the MemoNotes‚Ñ¢ system, revised 23 Jan. 88 by Peter Fraterdeus. MemoNotes creates a NoteField on your cards at your click, with a button attached which alternately shows and hides the Note. Included in the system are a ShowAllNotes button, and a RemoveNotes button, for MemoNote maintenance.
  383.  
  384. To use it, copy the whole script to your Home Stack, and copy the buttons(see Magic Copy, below) to the Background of the stack where you will be using the MemoNotes. MemoNotes is shareware,     ¬©1988 by Peter Fraterdeus. If you find it useful, help keep shareware healthy by sending $15, or at least a neat postcard with your enthusiastic kudos to me at Alphabets, Inc., 804 Dempster Street, Evanston, Illinois 60202....
  385. I can also be found on CompuServe 73306,2703, or by phone 312 328 2733.
  386. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 
  387.  
  388. *** The MemoNote button prompts you to click on the position that you want your new Note. The Field is Scrolling by default, but may be changed to Lined-Rectangle by Command-Shift-Clicking on it. The Note Button will show or hide its field when clicked.
  389. The Note Button will move to another location if you drag it immediately after clicking on it 
  390. (preserving the visible state and field size).  The Message box is used for prompting since the ridiculous "Ask" and "Answer" dialog boxes cover the card and won't redraw until the script is finished. 
  391.  
  392. ***ShowNotes shows or hides all the Notes on a card.
  393.  
  394. ***RemoveNotes prompts you to select a Note to remove. Click on the button not the field. Be careful with this, as you can't get your text back, once the field has been removed! Unfortunately there's no way to save the contents if the text is not copied elsewhere first‚Ķ (Maybe somebody out there will know how to do this‚Ķ)
  395.  
  396. ***Magic Button Copy***
  397. All of these buttons can be copied by Shift-Option-Clicking on them while you are in browse mode. If you transfer the whole script to your Home Stack, any button can be copied this way. Also, Shift-Clicking opens the script for editing.
  398.  
  399. *** I have found these little notes to be quite useful in the Calendar stacks, for making extended notations on a particular day, as well as in the Phone stack, where I have my entire phone list in one MemoNote, and can find and dial any number without leaving the stack!
  400.  
  401.  
  402.  
  403.  
  404.  
  405. -- part contents for card part 158
  406. ----- text -----
  407. *TransferScripts is a development tool for creating script writing scripts.
  408. The concept is to create a working model of the object (a note button in this case) and create a chunk of imbedded script that can be copied to the object creating script.
  409. *See the script for more details.
  410.